Optimal. Leaf size=178 \[ \frac{4 a^4 \cos ^5(c+d x)}{5 d}-\frac{4 a^4 \cos (c+d x)}{d}-\frac{a^4 \cot ^3(c+d x)}{3 d}-\frac{4 a^4 \cot (c+d x)}{d}+\frac{a^4 \sin ^5(c+d x) \cos (c+d x)}{6 d}+\frac{23 a^4 \sin ^3(c+d x) \cos (c+d x)}{24 d}-\frac{89 a^4 \sin (c+d x) \cos (c+d x)}{16 d}+\frac{6 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{135 a^4 x}{16} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.281226, antiderivative size = 178, normalized size of antiderivative = 1., number of steps used = 22, number of rules used = 7, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.241, Rules used = {2872, 3770, 3767, 8, 3768, 2635, 2633} \[ \frac{4 a^4 \cos ^5(c+d x)}{5 d}-\frac{4 a^4 \cos (c+d x)}{d}-\frac{a^4 \cot ^3(c+d x)}{3 d}-\frac{4 a^4 \cot (c+d x)}{d}+\frac{a^4 \sin ^5(c+d x) \cos (c+d x)}{6 d}+\frac{23 a^4 \sin ^3(c+d x) \cos (c+d x)}{24 d}-\frac{89 a^4 \sin (c+d x) \cos (c+d x)}{16 d}+\frac{6 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{135 a^4 x}{16} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2872
Rule 3770
Rule 3767
Rule 8
Rule 3768
Rule 2635
Rule 2633
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \cot ^4(c+d x) (a+a \sin (c+d x))^4 \, dx &=\frac{\int \left (-14 a^{10}-8 a^{10} \csc (c+d x)+3 a^{10} \csc ^2(c+d x)+4 a^{10} \csc ^3(c+d x)+a^{10} \csc ^4(c+d x)+14 a^{10} \sin ^2(c+d x)+8 a^{10} \sin ^3(c+d x)-3 a^{10} \sin ^4(c+d x)-4 a^{10} \sin ^5(c+d x)-a^{10} \sin ^6(c+d x)\right ) \, dx}{a^6}\\ &=-14 a^4 x+a^4 \int \csc ^4(c+d x) \, dx-a^4 \int \sin ^6(c+d x) \, dx+\left (3 a^4\right ) \int \csc ^2(c+d x) \, dx-\left (3 a^4\right ) \int \sin ^4(c+d x) \, dx+\left (4 a^4\right ) \int \csc ^3(c+d x) \, dx-\left (4 a^4\right ) \int \sin ^5(c+d x) \, dx-\left (8 a^4\right ) \int \csc (c+d x) \, dx+\left (8 a^4\right ) \int \sin ^3(c+d x) \, dx+\left (14 a^4\right ) \int \sin ^2(c+d x) \, dx\\ &=-14 a^4 x+\frac{8 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{7 a^4 \cos (c+d x) \sin (c+d x)}{d}+\frac{3 a^4 \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac{a^4 \cos (c+d x) \sin ^5(c+d x)}{6 d}-\frac{1}{6} \left (5 a^4\right ) \int \sin ^4(c+d x) \, dx+\left (2 a^4\right ) \int \csc (c+d x) \, dx-\frac{1}{4} \left (9 a^4\right ) \int \sin ^2(c+d x) \, dx+\left (7 a^4\right ) \int 1 \, dx-\frac{a^4 \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac{\left (3 a^4\right ) \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}+\frac{\left (4 a^4\right ) \operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\cos (c+d x)\right )}{d}-\frac{\left (8 a^4\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-7 a^4 x+\frac{6 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{4 a^4 \cos (c+d x)}{d}+\frac{4 a^4 \cos ^5(c+d x)}{5 d}-\frac{4 a^4 \cot (c+d x)}{d}-\frac{a^4 \cot ^3(c+d x)}{3 d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{47 a^4 \cos (c+d x) \sin (c+d x)}{8 d}+\frac{23 a^4 \cos (c+d x) \sin ^3(c+d x)}{24 d}+\frac{a^4 \cos (c+d x) \sin ^5(c+d x)}{6 d}-\frac{1}{8} \left (5 a^4\right ) \int \sin ^2(c+d x) \, dx-\frac{1}{8} \left (9 a^4\right ) \int 1 \, dx\\ &=-\frac{65 a^4 x}{8}+\frac{6 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{4 a^4 \cos (c+d x)}{d}+\frac{4 a^4 \cos ^5(c+d x)}{5 d}-\frac{4 a^4 \cot (c+d x)}{d}-\frac{a^4 \cot ^3(c+d x)}{3 d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{89 a^4 \cos (c+d x) \sin (c+d x)}{16 d}+\frac{23 a^4 \cos (c+d x) \sin ^3(c+d x)}{24 d}+\frac{a^4 \cos (c+d x) \sin ^5(c+d x)}{6 d}-\frac{1}{16} \left (5 a^4\right ) \int 1 \, dx\\ &=-\frac{135 a^4 x}{16}+\frac{6 a^4 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{4 a^4 \cos (c+d x)}{d}+\frac{4 a^4 \cos ^5(c+d x)}{5 d}-\frac{4 a^4 \cot (c+d x)}{d}-\frac{a^4 \cot ^3(c+d x)}{3 d}-\frac{2 a^4 \cot (c+d x) \csc (c+d x)}{d}-\frac{89 a^4 \cos (c+d x) \sin (c+d x)}{16 d}+\frac{23 a^4 \cos (c+d x) \sin ^3(c+d x)}{24 d}+\frac{a^4 \cos (c+d x) \sin ^5(c+d x)}{6 d}\\ \end{align*}
Mathematica [A] time = 1.64108, size = 229, normalized size = 1.29 \[ \frac{a^4 (\sin (c+d x)+1)^4 \left (-8100 (c+d x)-2415 \sin (2 (c+d x))-135 \sin (4 (c+d x))+5 \sin (6 (c+d x))-3360 \cos (c+d x)+240 \cos (3 (c+d x))+48 \cos (5 (c+d x))+1760 \tan \left (\frac{1}{2} (c+d x)\right )-1760 \cot \left (\frac{1}{2} (c+d x)\right )-480 \csc ^2\left (\frac{1}{2} (c+d x)\right )+480 \sec ^2\left (\frac{1}{2} (c+d x)\right )-5760 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )+5760 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )+320 \sin ^4\left (\frac{1}{2} (c+d x)\right ) \csc ^3(c+d x)-20 \sin (c+d x) \csc ^4\left (\frac{1}{2} (c+d x)\right )\right )}{960 d \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^8} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.096, size = 223, normalized size = 1.3 \begin{align*} -{\frac{9\,{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{5}\sin \left ( dx+c \right ) }{2\,d}}-{\frac{6\,{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{5\,d}}-{\frac{45\,{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) }{8\,d}}-{\frac{135\,{a}^{4}\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{16\,d}}-{\frac{135\,{a}^{4}c}{16\,d}}-2\,{\frac{{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{d}}-6\,{\frac{{a}^{4}\cos \left ( dx+c \right ) }{d}}-6\,{\frac{{a}^{4}\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}}-{\frac{135\,{a}^{4}x}{16}}-{\frac{{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{3\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}}}-{\frac{14\,{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{3\,d\sin \left ( dx+c \right ) }}-2\,{\frac{{a}^{4} \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.56699, size = 397, normalized size = 2.23 \begin{align*} \frac{128 \,{\left (6 \, \cos \left (d x + c\right )^{5} + 10 \, \cos \left (d x + c\right )^{3} + 30 \, \cos \left (d x + c\right ) - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{4} - 320 \,{\left (4 \, \cos \left (d x + c\right )^{3} - \frac{6 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + 24 \, \cos \left (d x + c\right ) - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{4} - 5 \,{\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 720 \,{\left (15 \, d x + 15 \, c + \frac{15 \, \tan \left (d x + c\right )^{4} + 25 \, \tan \left (d x + c\right )^{2} + 8}{\tan \left (d x + c\right )^{5} + 2 \, \tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{4} + 160 \,{\left (15 \, d x + 15 \, c + \frac{15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a^{4}}{960 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.28929, size = 641, normalized size = 3.6 \begin{align*} -\frac{40 \, a^{4} \cos \left (d x + c\right )^{9} - 390 \, a^{4} \cos \left (d x + c\right )^{7} - 405 \, a^{4} \cos \left (d x + c\right )^{5} + 2700 \, a^{4} \cos \left (d x + c\right )^{3} - 2025 \, a^{4} \cos \left (d x + c\right ) - 720 \,{\left (a^{4} \cos \left (d x + c\right )^{2} - a^{4}\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) + 720 \,{\left (a^{4} \cos \left (d x + c\right )^{2} - a^{4}\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) \sin \left (d x + c\right ) - 3 \,{\left (64 \, a^{4} \cos \left (d x + c\right )^{7} - 64 \, a^{4} \cos \left (d x + c\right )^{5} - 675 \, a^{4} d x \cos \left (d x + c\right )^{2} - 320 \, a^{4} \cos \left (d x + c\right )^{3} + 675 \, a^{4} d x + 480 \, a^{4} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.49392, size = 437, normalized size = 2.46 \begin{align*} \frac{10 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 120 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 2025 \,{\left (d x + c\right )} a^{4} - 1440 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 450 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{10 \,{\left (264 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 45 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 12 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - a^{4}\right )}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}} + \frac{2 \,{\left (1335 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} + 3085 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} - 3840 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} + 1110 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 7680 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 1110 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 7680 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 3085 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 4608 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1335 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 768 \, a^{4}\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{6}}}{240 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]